package com.example.controller;

import com.example.entity.RestBean;
import com.example.entity.dto.ToolKit;
import com.example.service.ToolKitService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 工具包控制类
 *
 * @auth shanyue
 * @date 2025年07月09日9:25
 */
@RestController
@RequestMapping("/api/toolKit")
public class ToolKitController {

    @Resource
    private ToolKitService toolKitService;

    /**
     * 获取工具列表接口
     *
     * @return 返回包含工具列表的统一响应对象
     */
    @GetMapping("getToolList")
    public RestBean<List<ToolKit>> getToolList() {
        List<ToolKit> list = toolKitService.list();
        return RestBean.success(list);
    }

}
